package com.eastjet.maintenance.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 保养计划
 * @TableName device_mp
 */
@TableName(value ="device_mp")
@Data
public class DeviceMp implements Serializable {
    /**
     * 保养计划编号
     */
    @TableId(type = IdType.AUTO)
    private Integer mpId;

    /**
     * 保养计划名称
     */
    private String mpName;

    /**
     * 保养计划编码
     */
    private String code;

    /**
     * 保养计划状态
     */
    private String mpState;

    /**
     * 保养计划类型
     */
    private String mpDaytype;

    /**
     * 执行周期规则
     */
    private Integer mpResult;

    /**
     * 执行规则描述
     */
    private String ruleDescription;

    /**
     * 计划开始时间
     */
    private Date mpOntime;

    /**
     * 计划结束时间
     */
    private Date mpUntime;

    /**
     * 保养班组
     */
    private String mpClass;

    /**
     * 保养人负责人
     */
    private String mpPserson;

    /**
     * 其他保养人
     */
    private String others;

    /**
     * 备注
     */
    private String mpNotes;

    /**
     * 计划保养完成状态(编码外键)
     */
    private Integer state;

    /**
     * 创建人
     */
    private String insertPerson;

    /**
     * 创建时间
     */
    private Date insertTime;

    /**
     * 更新人
     */
    private String updatePerson;

    /**
     * 更新时间
     */
    private Date updateTime;

    /**
     * 逻辑删除
     */
    private Integer isDelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DeviceMp other = (DeviceMp) that;
        return (this.getMpId() == null ? other.getMpId() == null : this.getMpId().equals(other.getMpId()))
            && (this.getMpName() == null ? other.getMpName() == null : this.getMpName().equals(other.getMpName()))
            && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode()))
            && (this.getMpState() == null ? other.getMpState() == null : this.getMpState().equals(other.getMpState()))
            && (this.getMpDaytype() == null ? other.getMpDaytype() == null : this.getMpDaytype().equals(other.getMpDaytype()))
            && (this.getMpResult() == null ? other.getMpResult() == null : this.getMpResult().equals(other.getMpResult()))
            && (this.getRuleDescription() == null ? other.getRuleDescription() == null : this.getRuleDescription().equals(other.getRuleDescription()))
            && (this.getMpOntime() == null ? other.getMpOntime() == null : this.getMpOntime().equals(other.getMpOntime()))
            && (this.getMpUntime() == null ? other.getMpUntime() == null : this.getMpUntime().equals(other.getMpUntime()))
            && (this.getMpClass() == null ? other.getMpClass() == null : this.getMpClass().equals(other.getMpClass()))
            && (this.getMpPserson() == null ? other.getMpPserson() == null : this.getMpPserson().equals(other.getMpPserson()))
            && (this.getOthers() == null ? other.getOthers() == null : this.getOthers().equals(other.getOthers()))
            && (this.getMpNotes() == null ? other.getMpNotes() == null : this.getMpNotes().equals(other.getMpNotes()))
            && (this.getState() == null ? other.getState() == null : this.getState().equals(other.getState()))
            && (this.getInsertPerson() == null ? other.getInsertPerson() == null : this.getInsertPerson().equals(other.getInsertPerson()))
            && (this.getInsertTime() == null ? other.getInsertTime() == null : this.getInsertTime().equals(other.getInsertTime()))
            && (this.getUpdatePerson() == null ? other.getUpdatePerson() == null : this.getUpdatePerson().equals(other.getUpdatePerson()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getIsDelete() == null ? other.getIsDelete() == null : this.getIsDelete().equals(other.getIsDelete()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getMpId() == null) ? 0 : getMpId().hashCode());
        result = prime * result + ((getMpName() == null) ? 0 : getMpName().hashCode());
        result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode());
        result = prime * result + ((getMpState() == null) ? 0 : getMpState().hashCode());
        result = prime * result + ((getMpDaytype() == null) ? 0 : getMpDaytype().hashCode());
        result = prime * result + ((getMpResult() == null) ? 0 : getMpResult().hashCode());
        result = prime * result + ((getRuleDescription() == null) ? 0 : getRuleDescription().hashCode());
        result = prime * result + ((getMpOntime() == null) ? 0 : getMpOntime().hashCode());
        result = prime * result + ((getMpUntime() == null) ? 0 : getMpUntime().hashCode());
        result = prime * result + ((getMpClass() == null) ? 0 : getMpClass().hashCode());
        result = prime * result + ((getMpPserson() == null) ? 0 : getMpPserson().hashCode());
        result = prime * result + ((getOthers() == null) ? 0 : getOthers().hashCode());
        result = prime * result + ((getMpNotes() == null) ? 0 : getMpNotes().hashCode());
        result = prime * result + ((getState() == null) ? 0 : getState().hashCode());
        result = prime * result + ((getInsertPerson() == null) ? 0 : getInsertPerson().hashCode());
        result = prime * result + ((getInsertTime() == null) ? 0 : getInsertTime().hashCode());
        result = prime * result + ((getUpdatePerson() == null) ? 0 : getUpdatePerson().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getIsDelete() == null) ? 0 : getIsDelete().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", mpId=").append(mpId);
        sb.append(", mpName=").append(mpName);
        sb.append(", code=").append(code);
        sb.append(", mpState=").append(mpState);
        sb.append(", mpDaytype=").append(mpDaytype);
        sb.append(", mpResult=").append(mpResult);
        sb.append(", ruleDescription=").append(ruleDescription);
        sb.append(", mpOntime=").append(mpOntime);
        sb.append(", mpUntime=").append(mpUntime);
        sb.append(", mpClass=").append(mpClass);
        sb.append(", mpPserson=").append(mpPserson);
        sb.append(", others=").append(others);
        sb.append(", mpNotes=").append(mpNotes);
        sb.append(", state=").append(state);
        sb.append(", insertPerson=").append(insertPerson);
        sb.append(", insertTime=").append(insertTime);
        sb.append(", updatePerson=").append(updatePerson);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", isDelete=").append(isDelete);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}